<?php

use App\Http\Controllers\Admin\TestController;
use App\Http\Controllers\Alipay\AuthenticNewController;
use App\Http\Controllers\Alipay\GoodsNewController;
use App\Http\Controllers\Alipay\OrderNewController;
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\Alipay\IndexController;
use App\Http\Controllers\Alipay\GoodsController;
use App\Http\Controllers\Alipay\OrderController;
use App\Http\Controllers\Alipay\ShopController;
use App\Http\Controllers\Alipay\AuthorizationController;
use App\Http\Controllers\Alipay\NoticeController;
use App\Http\Controllers\Alipay\MyCentreController;
use App\Http\Controllers\Alipay\PayController;
use App\Http\Controllers\Alipay\AuthenticController;
use App\Http\Controllers\Alipay\ComplaintSuggestController;
use App\Http\Controllers\Alipay\HelpController;
use App\Http\Controllers\Alipay\UploadController;
use App\Http\Controllers\Alipay\AddressController;
use App\Http\Controllers\Alipay\AntchainController;
use App\Http\Controllers\Alipay\BankController;


Route::middleware(['cors', 'app_parse'])->group(function () {
    Route::group([
        'prefix' => 'Alipay',
    ], function () {
        Route::post('/upload', [UploadController::class, 'upload']); //文件上传接口
        Route::get('/Index/index', [IndexController::class, 'Index']);//首页模块配置数据
        Route::get('/Index/categoryList', [IndexController::class, 'listCategoryList']);//首页推荐分类
        Route::get('/Index/indexList', [IndexController::class, 'indexList']);//首页推荐商品列表
        Route::get('/Index/getActivityPageById', [IndexController::class, 'getActivityPageById']);//根据id获取活动分类
        Route::get('/Index/getMiniPlate', [IndexController::class, 'getMiniPlate']);//获取小程序菜单
        Route::post('/Index/getMarketingActivity', [IndexController::class, 'getMarketingActivity']);//根据id获取活动
        Route::get('/Index/getMiniName', [IndexController::class, 'getMiniName']);//获取小程序菜单
        Route::post('/Index/getCollectionConfig', [IndexController::class, 'getCollectionConfig']);//收藏配置


        Route::get('/Goods/getGoodsInfo', [GoodsController::class, 'getGoodsInfo']);//商品详情
        Route::post('/Goods/getGoodsInfo', [GoodsController::class, 'getGoodsInfo']);//商品详情
        Route::get('/Goods/getGoodsParameter', [GoodsController::class, 'getGoodsParameter']);//获取商品参数
        Route::get('/Goods/getGoodsSetmeal', [GoodsController::class, 'getGoodsSetmeal']);//获取套餐信息
        Route::get('/Goods/getCategory', [GoodsController::class, 'getCategory']);//获取商品分类
        Route::post('/Goods/getGoodsList', [GoodsController::class, 'getGoodsList']);//获取商品列表
        Route::get('/Goods/getInsuranceList', [GoodsController::class, 'getInsuranceList']);//获取商品碎屏险
        Route::get('/Goods/getCardList',[GoodsController::class,'getCardList']);//获取商品冲浪卡
        Route::get('/Goods/getGoodsRentSetmeal',[GoodsController::class,'getGoodsRentSetmeal']);//获取租赁方式
        Route::post('/Goods/getGoodsCateList',[GoodsController::class,'getGoodsCateList']);//获取租赁方式
        Route::post('/Goods/getHomeGoodsList',[GoodsController::class,'getHomeGoodsList']);//首页商品列表

        Route::post('/Goods/getGoodsListByCategory',[GoodsController::class,'getGoodsListByCategory']);//首页商品列表


        Route::post('/Order/creditBizOrderCreate', [OrderController::class, 'creditBizOrderCreate']);//信用下单
        Route::post('/Order/confirmOrder', [OrderController::class, 'confirmOrder']);//确认订单
        Route::post('/Order/getOrderLeaseTerm', [OrderController::class, 'getOrderLeaseTerm']);//获取订单租期详情
        Route::post('/Order/makeOrder', [OrderController::class, 'makeOrder']);//生成订单
        Route::post('/Order/createPreAuth', [OrderController::class, 'createPreAuth']);//唤起预授权
        Route::post('/Order/createContract', [OrderController::class, 'createContract']);//创建合同
        Route::post('/Order/createHuabei', [OrderController::class, 'createHuabei']);//花呗支付

        Route::get('/Order/getOrderCount', [OrderController::class, 'getOrderCount']);//获取订单数量
        Route::post('/Order/orderList', [OrderController::class, 'orderList']);//订单列表
        Route::get('/Order/orderInfo', [OrderController::class, 'orderInfo']);//订单详情
        Route::get('/Order/getOrderLease', [OrderController::class, 'getOrderLease']);//账单详情
        Route::post('/Order/orderCancel', [OrderController::class, 'orderCancel']);//未支付取消订单
        Route::get('/Order/getOrderRefundData', [OrderController::class, 'getOrderRefundData']);//获取申请退款页面信息
        Route::post('/Order/applyOrderRefund', [OrderController::class, 'applyOrderRefund']);//已支付待发货订单申请退款
        Route::post('/Order/cancelOrderRefund', [OrderController::class, 'cancelOrderRefund']);//撤销退款申请
        Route::get('/Order/checkOrderExpress', [OrderController::class, 'checkOrderExpress']);//查看物流
        Route::post('/Order/orderConfirmReceiving', [OrderController::class, 'orderConfirmReceiving']);//确认收货
        Route::get('/Order/getOrderBuyoutData', [OrderController::class, 'getOrderBuyoutData']);//获取买断详情
        Route::post('/Order/orderBuyoutPay', [OrderController::class, 'orderBuyoutPay']);//买断支付
        Route::get('/Order/orderTransSnapshot', [OrderController::class, 'orderTransSnapshot']);//买断支付
        Route::get('/Order/getOrderReturnAddress', [OrderController::class, 'getOrderReturnAddress']);//获取订单归还地址
        Route::post('/Order/orderReturnAddExpress', [OrderController::class, 'orderReturnAddExpress']);//订单归还添加快递信息
        Route::post('/Order/orderApplyReturn', [OrderController::class, 'orderApplyReturn']);//申请提前归还
        Route::post('/Order/orderReturnCancel', [OrderController::class, 'orderReturnCancel']);//撤销申请提前归还
        Route::get('/Order/getReturnExpressList', [OrderController::class, 'getReturnExpressList']);//获取归还物流公司信息
        Route::get('/Order/getReturnExpressData', [OrderController::class, 'getReturnExpressData']);//获取归还物流信息
        Route::get('/Order/orderPreAuth', [OrderController::class, 'orderPreAuth']);//智能合同订单转预授权
        Route::get('/Order/getRenewalGoodsStatus', [OrderController::class, 'getRenewalGoodsStatus']);//获取续租商品状态
        Route::post('/Order/makeLineOrder', [OrderController::class, 'makeLineOrder']);//确认线下订单


        Route::post('/Order/createWithholdSign', [OrderController::class, 'createWithholdSign']);//创建签署代扣链接
        Route::post('/Order/querySignFlow', [IndexController::class, 'querySignFlow']);//电子合同查询
        //联通选卡
        Route::post('/Order/unicomSelect', [OrderController::class, 'unicomSelect']);//选号
        Route::post('/Order/unicomChange', [OrderController::class, 'unicomChange']);//预占
        Route::post('/Order/unicomProtocal', [OrderController::class, 'unicomProtocal']);//协议

       Route::post('/Order/getNotaryUrl', [OrderController::class, 'getNotaryUrl']);//协议公证


        Route::get('/Shop/getShopBanner', [ShopController::class, 'getShopBanner']);//获取店铺轮播图
        Route::get('/Shop/getShopCityLocation', [ShopController::class, 'getShopCityLocation']);//获取商户是否开启城市定位
        Route::get('/Shop/getShopCategory', [ShopController::class, 'getShopCategory']);//获取店铺分类
        Route::post('/Shop/getShopIndex', [ShopController::class, 'getShopIndex']);//获取商户店铺首页商品信息
        Route::post('/Shop/getShopGoods', [ShopController::class, 'getShopGoods']);//根据分类id获取商户商品
        Route::get('/Shop/getTelePhone', [ShopController::class, 'getTelePhone']);//获取客服电话
        Route::post('/Shop/supplierApply', [ShopController::class, 'supplierApply']);//供应商申请
        Route::get('/Shop/getAreas', [ShopController::class, 'getAreas']);//获取城市列表
        Route::get('/Shop/getSupplierData', [ShopController::class, 'getSupplierData']);//供应商申请

        Route::post('/Auth/grantAuth', [AuthorizationController::class, 'grantAuth']);//静默和主动授权
        Route::post('/Auth/realPersonAuth', [AuthenticController::class, 'realPersonAuth']);//唤起实人认证
        Route::post('/Auth/checkPersonAuth', [AuthenticController::class, 'checkPersonAuth']);//实人认证查询
        Route::post('/Auth/getPersonAuth', [AuthenticController::class, 'getPersonAuth']);//获取实名认证信息
        Route::post('/Auth/getAuthentic', [AuthenticController::class, 'getAuthentic']);//下单智能合同中转页面，获取用户实名认证信息

        Route::post('/Auth/grantAuthMobile', [AuthenticController::class, 'grantAuthMobile']);//手机号授权解析


        Route::post('/Auth/realPersonAuth1', [AuthenticController::class, 'realPersonAuth1']);//唤起实人认证-e签宝
        Route::post('/Auth/checkPersonAuth1', [AuthenticController::class, 'checkPersonAuth1']);//实人认证查询-e签宝
        Route::any('/Auth/checkPersonAuthUrl', [AuthenticController::class, 'checkPersonAuthUrl']);//实人认证跳转-e签宝
        Route::any('/Auth/grantAuthIdNumber', [AuthenticController::class, 'grantAuthIdNumber']);//身份证信息获取

        //关于我们、帮助中心
        Route::get('/Help/getAboutUsType', [HelpController::class, 'getAboutUsType']); //获取关于我们分类
        Route::get('/Help/getAboutUs', [HelpController::class, 'getAboutUs']);//获取关于我们
        Route::get('/Help/getCommonProblemType', [HelpController::class, 'getCommonProblemType']);//获取常见问题分类
        Route::get('/Help/getCommonProblemById', [HelpController::class, 'getCommonProblemById']);//获取常见问题
        Route::get('/Help/getAgreement', [HelpController::class, 'getAgreement']);//获取服务协议
        Route::get('/Help/getPrivacy', [HelpController::class, 'getPrivacy']);//获取服务协议

        Route::get('/Help/getHelpCategory', [HelpController::class, 'getHelpCategory']); //获取关于我们分类
        Route::get('/Help/getHelpList', [HelpController::class, 'getHelpList']); //获取关于我们分类
        Route::get('/Help/getHelpDetail', [HelpController::class, 'getHelpDetail']); //获取关于我们分类

        Route::post('/Help/platformArticleList', [HelpController::class, 'platformArticleList']);//平台公告列表
        Route::post('/Help/platformArticleDetail', [HelpController::class, 'platformArticleDetail']);//详情
        Route::post('/Pay/submitOrderDepictPay', [PayController::class, 'submitOrderDepictPay']);//主动支付
        Route::post('/Pay/submitOrderShouldPayDetail', [PayController::class, 'submitOrderShouldPayDetail']);//主动支付

        //投诉建议
        Route::get('/ComplaintSuggest/getSuggestType', [ComplaintSuggestController::class, 'getSuggestType']);//获取投诉类型
        Route::post('/ComplaintSuggest/submitComplaintSuggest', [ComplaintSuggestController::class, 'submitComplaintSuggest']);//提交投诉建议
        Route::post('/ComplaintSuggest/getSuggest', [ComplaintSuggestController::class, 'getSuggest']);//根据类型获取投诉建议
        Route::post('/ComplaintSuggest/cancel', [ComplaintSuggestController::class, 'cancel']);//撤销
        Route::post('/ComplaintSuggest/unresolved', [ComplaintSuggestController::class, 'unresolved']);//未解决
        Route::post('/ComplaintSuggest/resolved', [ComplaintSuggestController::class, 'resolved']);//已解决
        Route::get('/ComplaintSuggest/lookProgress', [ComplaintSuggestController::class, 'lookProgress']);//查看进度
        Route::get('/ComplaintSuggest/overtime', [ComplaintSuggestController::class, 'overtime']);//投诉超时定时任务

        //个人中心
        Route::get('/Centre/indexList', [MyCentreController::class, 'indexList']);//首页推荐商品列表
        Route::get('/Centre/getCollection', [MyCentreController::class, 'getCollection']);//获取收藏商品列表
        Route::post('/Centre/delCollection', [MyCentreController::class, 'delCollection']);//删除收藏
        Route::post('/Centre/delCollectionByGoodsId', [MyCentreController::class, 'delCollectionByGoodsId']);//通过商品id删除收藏
        Route::post('/Centre/addCollection', [MyCentreController::class, 'addCollection']);//添加收藏
        Route::get('/Centre/checkCollection', [MyCentreController::class, 'checkCollection']);//检测商品是否收藏

        //主动支付
        Route::post('/Pay/prepaymentPay', [PayController::class, 'prepaymentPay']);//主动支付
        Route::post('/Pay/orderInsuranceBuy', [PayController::class, 'orderInsuranceBuy']);//订单碎屏险购买
        Route::post('/Pay/submitLeasePartial', [PayController::class, 'submitLeasePartial']);//逾期部分还款
        Route::post('/Pay/leasePartialDetail', [PayController::class, 'leasePartialDetail']);//主动支付



        //智能合同
        Route::post('/Antchain/createAntchain', [AntchainController::class, 'createAntchain']);//创建智能合同
        Route::post('/Antchain/antchain', [AntchainController::class, 'antchain']);//创建智能合同


        /**********************回调地址****************/
        Route::any('/Notice/preAuthNotify', [NoticeController::class, 'preAuthNotify']);//预授权回调
        Route::any('/Notice/payNotify', [NoticeController::class, 'payNotify']);//支付异步回调
        Route::any('/Notice/esignNotify', [NoticeController::class, 'esignNotify']);//e签宝合同签署回调
        Route::any('/Notice/huabeiNotify', [NoticeController::class, 'huabeiNotify']);//花呗回调
        Route::any('/Notice/prepaymentNotify', [NoticeController::class, 'prepaymentNotify']);//主动支付回调
        Route::any('/Notice/orderBuyoutNotify', [NoticeController::class, 'orderBuyoutNotify']);//买断支付回调
        Route::any('/Notice/deductDepositNotify', [NoticeController::class, 'deductDepositNotify']);//扣除押金异步回调
        Route::any('/Notice/antchainContractNotify', [NoticeController::class, 'antchainContractNotify']);//智能合同异步回调
        Route::any('/Notice/antchainNotify', [NoticeController::class, 'antchainNotify']);//智能合同代扣异步回调
        Route::any('/Notice/orderInsuranceNotify', [NoticeController::class, 'orderInsuranceNotify']);//碎屏险支付回调
        Route::any('/Notice/faceAuthNotice', [NoticeController::class, 'faceAuthNotice']);//实人认证回调-e签宝
        Route::any('/Notice/faceAuthSignNotice', [NoticeController::class, 'faceAuthSignNotice']);//实人认证回调-e签宝-下单
        Route::any('/Notice/getOrderAscyn', [NoticeController::class, 'getOrderAscyn']);//同步订单
        Route::any('/Notice/getOrderAscynRemark', [NoticeController::class, 'getOrderAscynRemark']);//同步订单风控备注
        Route::any('/Notice/marketingActivity', [NoticeController::class, 'marketingActivity']);//同步订单风控备注
        Route::any('/Notice/antchainAtoNotify', [NoticeController::class, 'antchainAtoNotify']);//租赁平台异步回调
        Route::any('/Notice/notarizeNotary', [NoticeController::class, 'notarizeNotary']);//公证成功通知
        Route::any('/Notice/alipayFromNotify', [NoticeController::class, 'alipayFromNotify']);// 支付宝From消息回调
        Route::any('/Notice/orderDepictNotify', [NoticeController::class, 'orderDepictNotify']);// 支付宝From消息回调

        /********************************************/
        /********************** 收货地址管理**********************/
        Route::get('/Address/addressList', [AddressController::class, 'addressList']);//地址列表
        Route::post('/Address/addAddress', [AddressController::class, 'addAddress']);//新增地址
        Route::get('/Address/detailAddress', [AddressController::class, 'detailAddress']);//地址详情
        Route::post('/Address/editAddress', [AddressController::class, 'editAddress']);//修改地址
        Route::post('/Address/deleteAddress', [AddressController::class, 'deleteAddress']);//软删除地址

        /**********************银行卡协议支付**********************/
        Route::post('/Bank/readySign', [BankController::class, 'readySign']);//银行卡协议支付
        Route::post('/Bank/confirmSigning', [BankController::class, 'confirmSigning']);//银行卡协议支付
        Route::post('/Bank/payOrder', [BankController::class, 'payOrder']);//银行卡协议支付
        Route::post('/Bank/querySign', [BankController::class, 'querySign']);//银行卡协议支付
        Route::get('/Bank/getBankAgree', [BankController::class, 'getBankAgree']);//银行卡协议支付

        Route::get('/Bank/bankList', [BankController::class, 'bankList']);//银行列表
        Route::get('/Bank/myBankCard', [BankController::class, 'myBankCard']);//银行列表
        Route::get('/Bank/getYiFuBaoAgree', [BankController::class, 'getYiFuBaoAgree']);//获取数字证书协议

        Route::post('/Bank/readyPay', [BankController::class, 'readyPay']);//支付发送验证码
        Route::post('/Bank/confirmPay', [BankController::class, 'confirmPay']);//确认支付


        // 测试使用
        Route::any('/Test/testAto', [TestController::class, 'testAto']); //智能风控


        Route::any('/Goods/getGoodsSetmeal_new', [GoodsNewController::class, 'getGoodsSetmeal']);//获取套餐信息
        Route::any('/Order/confirmOrder_new', [OrderNewController::class, 'confirmOrder']);//确认订单
        Route::any('/Order/makeOrder_new', [OrderNewController::class, 'makeOrder']);//生成订单
        Route::any('/Order/orderInfo_new', [OrderNewController::class, 'orderInfo']);//订单详情
        Route::post('/Auth/realPersonAuth1_new', [AuthenticNewController::class, 'realPersonAuth1']);//唤起实人认证-e签宝


        Route::any('/Order/idCardImg', [OrderNewController::class, 'idCardImg']);

    });

});

